<template>
  <div style="display: flex; justify-content: space-between; flex-wrap: wrap">
    <EchartsItemDetails
      title=""
      :row="2"
      :option="options1"
      echartId="first-1"
    />
    <EchartsItemDetails
      title=""
      :row="2"
      :option="options2"
      echartId="first-2"
    />
  </div>
</template>
<script>
export default {
  data() {
    return {
      options1: {
        title: {
          text: "数据分布构成",
          left: "center",
        },
        tooltip: {
          trigger: "item",
        },
        legend: {
          top: "15%",
        },
        series: [
          {
            name: "Access From",
            type: "pie",
            top: "30%",
            radius: "80%",
            data: [
              { value: 1048, name: "<60%" },
              { value: 735, name: "60%-80%" },
              { value: 580, name: "80%-100%" },
            ],
            emphasis: {
              itemStyle: {
                shadowBlur: 10,
                shadowOffsetX: 0,
                shadowColor: "rgba(0, 0, 0, 0.5)",
              },
            },
          },
        ],
      },
      options2: {
        title: {
          text: "完成率",
          left: "center",
        },
        grid: {
          height: "200px",
        },
        xAxis: {
          type: "category",
          data: [
            "2021-06",
            "2021-12",
            "2022-06",
            "2022-12",
            "2023-06",
            "2023-12",
            "2024-06",
          ],
        },
        yAxis: {
          type: "value",
        },
        series: [
          {
            data: [100, 80, 96, 75, 86, 93, 92],
            type: "line",
          },
        ],
      },
    };
  },
};
</script>
<style scoped></style>
